# -*- encoding: utf-8 -*-
"""
@File   : weibo_top.py
@Time   : 2024/1/2 21:51
@Author : king
@Project : pytest_fortest
"""

import scrapy

from ..items import testItem


class TestSpider(scrapy.Spider):
    name = 'test'
    start_urls  = ['https://www.rrdynb.com/dianshiju/2022/1230/32326.html']

    def parse(self, response):
        div_spans = response.xpath('//div/span/text()').extract()
        for content in div_spans:
            print(content)
        # for hot in hot_lists:
        #     new_item = testItem()

def log_decorator(func):
    def wrapper(*args, **kwargs):
        print(f"calling {func.__name__}")
        result = func(*args, **kwargs)
        print(f"{func.__name__} finished")
        return result
    return wrapper

